import service from '@/utils/request'

export const tenantPackageApi = (id: number) => {
	return service.get('/sys/tenantPackage/' + id)
}
export const tenantPackageListApi = () => {
	return service.get('/sys/tenantPackage/list')
}

export const usePackageMenuApi = () => {
	return service.get('/sys/tenantPackage/menu')
}

export const tenantPackageSubmitApi = (dataForm: any) => {
	if (dataForm.id) {
		return service.put('/sys/tenantPackage', dataForm)
	} else {
		return service.post('/sys/tenantPackage', dataForm)
	}
}